home *** CD-ROM | disk | FTP | other *** search
/ The 640 MEG Shareware Studio 2 / The 640 Meg Shareware Studio CD-ROM Volume II (Data Express)(1993).ISO / pascal / tch_tpas.zip / PROG14.PAS < prev    next >
Pascal/Delphi Source File  |  1986-04-05  |  640b  |  27 lines

  1. PROGRAM PROG14;
  2. {$U+    Copyright (C), 1985 by Lyle Faurot.  All rights reserved.
  3.  
  4.     New Topics:  Procedure declaration
  5.                  Using procedures
  6.                  Using parameters
  7.                  Counter with error checking
  8.  
  9. }
  10.  
  11. VAR
  12.   Count, Adjusted_Count  : Integer;
  13.   I, J, K                : Integer;
  14.  
  15. PROCEDURE Add(No_1, No_2 : Integer; VAR Sum : Integer);
  16.  
  17. BEGIN
  18.   Sum := No_1 + No_2;
  19. END;
  20.  
  21. BEGIN
  22.   Write('Enter count: ');
  23.   ReadLn(Count);
  24.   Add(2, Count, Adjusted_Count);
  25.   WriteLn('Adjusted Count is: ',Adjusted_Count);
  26. END.
  27.